package com.guavestudios.fnfo.plugins {
	import flash.events.Event;
	
	/**
	 * ...
	 * @author maze
	 */
	public class FnfoVersionInfo extends BasicFnfoPlugin{
		
		public function FnfoVersionInfo() {
			super();
			_pluginId = "FnfoVersionInfo";
		}
		
		override protected function fnfo_gatherData(e:Event):void {
			var data:Object = _fnfo.data;
			
			if (data["version"] != null)
				_fnfo.printInfo("Version", data["version"]);
			if (data["versioninfo"] != null) {
				var s:String = (new (data["versioninfo"] as Class)()).toString();
				var a:Array = s.split("\r\n");
				//printInfo("VersionInfo", s);
				var ai:Array;
				for (var i:int = 0, ilen:int = a.length; i < ilen; i++) {
					if (a[i].length < 1) continue;
					ai = a[i].split(": ");
					_fnfo.printInfo(ai[0],ai[1]);
				}
			}
		}
	}

}